import request from '@/utils/request'

// 封装组织页面信息
export const getDespAPi = () => {
  return request.get('/company/department')
}

// 封装组织部门负责人列表
export const getManagerDspApi = (params) => {
  return request.get('/sys/user/simple')
}

// 封装新增部门
export const getAddDspApi = (data) => {
  // return request.post('/company/department', data)
  return request({ url: '/company/department', method: 'post', data })
}

// 封装编辑部门数据
export const getDepDetailApi = (id) => {
  return request({ url: `/company/department/${id}`, method: 'get' })
}

// 封装编辑修改数据
export const updateDepApi = (data) => {
  return request.put('/company/department/' + data.id, data)
}

// 封装删除
export const delDepApi = (id) => {
  return request.delete(`/company/department/${id}`)
}
